package com.aco.party.enums;

/**
 * Created by flying on 4/12/2016 0012.
 */
public enum MessageEnum {
    已读(1,"已读"),
    未读(0,"未读"),
    NULL(-1,"");

    private int value;
    private String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    MessageEnum(int value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public static MessageEnum getMessageEnum(int value){
        for (MessageEnum type : MessageEnum.values()) {
            if(type.value == value)
                return type;
        }
        return NULL;
    }
}
